package com.shenmazong.servereduresume.controller;

import com.baomidou.mybatisplus.extension.service.IService;
import com.shenmazong.servereduresume.dto.TbPractice;
import com.shenmazong.servereduresume.service.TbPracticeService;
import com.shenmazong.utils.ResultResponse;
import com.shenmazong.vo.BatchChooseIdVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 *
 */
@RestController
@RequestMapping("practice")
public class TbPracticeController {
    @Autowired
    private TbPracticeService tbPracticeService;

    @PostMapping("findByInformationId")
    public ResultResponse findByInformationId(@RequestBody BatchChooseIdVo batchChooseIdVo){
        return tbPracticeService.findByInformationId(batchChooseIdVo);
    }
    @PostMapping("saveOrUpdatePractice")
    public ResultResponse saveOrUpdatePractice(@RequestBody TbPractice tbPractice){
        return tbPracticeService.saveOrUpdatePractice(tbPractice);
    }
    @PostMapping("deletePractice")
    public ResultResponse deletePractice(@RequestBody BatchChooseIdVo batchChooseIdVo){
        return tbPracticeService.deletePractice(batchChooseIdVo);
    }
}
